package Vista;
import java.awt.BorderLayout;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;

import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class VentanaMenu extends javax.swing.JFrame {
	private JPanel panMenu;
	private JButton btnarbitro;
	private JLabel jlb;
	private JButton btnconsultarTabla;
	private JButton btnconsulta;
	private JButton btnequipo;
	private JButton btnGenerarPartido;

	/**
	* Auto-generated main method to display this JFrame
	*/

	public VentanaMenu() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			{
				panMenu = new JPanel();
				getContentPane().add(panMenu, BorderLayout.CENTER);
				panMenu.setLayout(null);
				panMenu.setBackground(new java.awt.Color(197,229,249));
				{
					btnGenerarPartido = new JButton();
					panMenu.add(btnGenerarPartido);
					btnGenerarPartido.setText("Generar Partidos");
					btnGenerarPartido.setBounds(106, 308, 194, 77);
					btnGenerarPartido.setBackground(new java.awt.Color(255,255,255));
				}
				{
					btnarbitro = new JButton();
					panMenu.add(btnarbitro);
					btnarbitro.setText("Registrar Arbitro");
					btnarbitro.setBounds(106, 75, 194, 80);
					btnarbitro.setBackground(new java.awt.Color(255,255,255));
				}
				{
					btnequipo = new JButton();
					panMenu.add(btnequipo);
					btnequipo.setText("Registrar Equipo");
					btnequipo.setBounds(106, 189, 194, 80);
					btnequipo.setBackground(new java.awt.Color(255,255,255));
				}
				{
					btnconsulta = new JButton();
					panMenu.add(btnconsulta);
					btnconsulta.setText("Consultar Calendario");
					btnconsulta.setBounds(106, 439, 194, 80);
					btnconsulta.setBackground(new java.awt.Color(255,255,255));
				}
				{
					btnconsultarTabla = new JButton();
					panMenu.add(btnconsultarTabla);
					btnconsultarTabla.setText("Consultar Tabla");
					btnconsultarTabla.setBounds(106, 561, 194, 76);
					btnconsultarTabla.setBackground(new java.awt.Color(255,255,255));
				}
				{
					jlb = new JLabel();
					panMenu.add(jlb);
					jlb.setText("MENU PRINCIPAL");
					jlb.setBounds(128, 24, 197, 16);
					jlb.setFont(new java.awt.Font("DejaVu Sans",0,18));
				}
			}
			pack();
			setSize(400,700);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}
	//controla cuando se le da clic a los botones
	public void agregarListener(ActionListener accion)
	{
		btnGenerarPartido.addActionListener(accion);
		btnequipo.addActionListener(accion);
		btnconsulta.addActionListener(accion);
		btnarbitro.addActionListener(accion);
		btnconsultarTabla.addActionListener(accion);
	}
	public void mostrarMensaje(String mensaje)
	{
		JOptionPane.showMessageDialog(this, mensaje);
	}

}
